<template>
    <div class="com-cnt">
        <h5>生鲜商品到货后24小时内有质量问题方可退换</h5>
        <ul class="afterSailList">
            <li class="afterSailLi" v-for="item in sailList">
                <div class="liHead">{{new Date(item.applyDate).toLocaleDateString().replace(/\//g, "-")+ " " + new Date(item.applyDate).toTimeString().substr(0,8)}}</div>
                <ul class="picList">
                    <li class="picLi" v-if="item.picture1"><img :src="item.picture1" alt=""></li>
                    <li class="picLi" v-if="item.picture2"><img :src="item.picture2" alt=""></li>
                    <li class="picLi" v-if="item.picture3"><img :src="item.picture3" alt=""></li>
                </ul>
                <div class="checkBack">
                    <!-- <p class="timeOver">该商品已超过售后期</p> -->
                    <p class="hadBack" v-if="item.status=='PENDING'">申请中</p>
                    <p class="hadBack" v-if="item.status=='APPROVED'">已受理</p>
                    <p class="hadBack" v-if="item.status=='FAILED'">审核失败</p>
                    <!-- <p class="submitAfterSail">查看详情</p> -->
                </div>
            </li>
        </ul>
    </div>
</template>

<script>
import http from "@/assets/js/axios"
import { domain,domain2 } from '@/assets/js/config'
//import { fastclick } from "@/assets/js/fastclick.js";
import {Loadmore} from 'mint-ui'
import Qs from 'qs'
import axios from 'axios'
import $ from 'jquery'
export default {
    name: 'afterSailPage',
    data() {
        return {
            sailList: []
        }
    },
    created(){
        this.getList()
    },
    mounted() {
        
    },
    methods: {
        direct: function (val) {
            this.$router.push({ path: "/afterDetails" ,
            query: {
                    id: val,
                }
            })
        },
        getList: function(){
            let that = this
            axios({
                url: domain2 + '/shop/api/member/aftersalesInfo/list',
                method: 'post',
                headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
                //data: Qs.stringify({})
            }).then(res => { that.getListSucc(res) }).catch(err => { console.log(err) })
        },
        getListSucc: function(res){
            console.log(res.data)
            this.sailList = res.data.data.content
        }
    },
}
</script>
<style lang="stylus" scoped>
.com-cnt
    width 100%
    height 100%
    font-size 12px
    h5 
        height 44px
        line-height 44px
        background #F0F0F0
        color #333333
        text-indent 12px
    .afterSailList
        .afterSailLi 
            padding 0 12px
            height 202px
            border-bottom 12px solid #F0F0F0
            .liHead
                height 34px
                line-height 34px
                border-bottom 1px solid #F0F0F0
            .picList
                height 104px
                padding 12px 0
                border-bottom 1px solid #F0F0F0
                .picLi
                    width 80px
                    height 80px
                    float left
                    margin-left 10px
                    img 
                        width 100%
                        height 100%
            .checkBack
                height 50px
                .timeOver
                    float left 
                    width 130px
                    height 50px
                    line-height 50px
                .submitAfterSail
                    float right
                    width 80px
                    height 30px
                    line-height 30px
                    text-align center
                    border 1px solid #d7d7d7
                    border-radius 3px
                    margin-top 10px
                    margin-left 10px
                .hadBack
                    float right
                    width 80px
                    height 30px
                    line-height 30px
                    text-align center
                    margin-top 10px
                    margin-left 10px
    
</style>